package avicit.im.lantop.basic.companycorrespondence.service;

import avicit.platform6.core.dao.Paging;
import avicit.platform6.core.jdbc.Page;
import com.github.pagehelper.Page;

import java.util.Map;

/**
 * @ClassName CompanyCorrespondenceService
 * @Description 新旧单位部门对应
 * @Author zcl
 * @Date 2020/9/16 9:56
 */
public interface CompanyCorrespondenceService {

	/**
	 * 查询
	 * @param page
	 * @param parameter
	 * @return Page<Map<String,Object>>
	 * @throws
	 */
	public Page<Map<String, Object>> loadCompanyCorrespondence(
            Paging<Map<String, Object>> page, Map<String, Object> parameter);

	/**
	 * 删除
	 * @param ids
	 * @throws Exception void
	 * @throws
	 */
	public void deleteCompanyCorrespondence(String ids) throws Exception;

	/**
	 * 新增
	 * @param orgId
	 * @param currentDeptId
	 * @param currentDeptName
	 * @param counterpartDeptName
	 * @throws Exception
	 */
	public void insertCompanyCorrespondence(String orgId, String currentDeptId, String currentDeptName, String counterpartDeptName) throws Exception;

	/**
	 * 查询
	 * @param currentDeptId
	 * @param counterpartDeptName
	 * @return
	 */
	public Boolean queryCheckData(String currentDeptId, String counterpartDeptName);

	/**
	 * 获取部门
	 * @param orgId
	 * @param orgCode
	 * @throws Exception
	 */
	public Map<String, Object> getDept(String orgId, String orgCode,String inputWord) throws Exception;


	/**
	 * 获取对应部门
	 * @param orgId
	 * @param counterpartDeptName
	 * @return
	 * @throws Exception
	 */
	public String getCorrespondenceDept(String orgId, String counterpartDeptName) throws Exception;

	/**
	 *新增页面，选择现有部门时，需要根据已保存的对应关系，再剔除旧部门中已对应的部门
	 * @param newDeptName
	 * @param orgId
	 * @return
	 */
	public Map<String,Object> getOldDept(String inputWord,String newDeptName,String orgId,String tempOrgCode) throws Exception;
}